﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace TimeTracker
{
    public partial class IdleSession : Form
    {
        public IdleSession()
        {
            InitializeComponent();

            this.label1.Text = String.Format("Your session went idle at {0:HH:mm:ss}", Manager.Instance.IdleTime);
        }

        private void timer1_Tick(object sender, EventArgs e)
        {

        }

        //No
        private void button1_Click_1(object sender, EventArgs e)
        {
            ((Form1)this.Owner).StopTracking(Manager.Instance.IdleTime);

            Manager.Instance.EndIdle();

            this.Close();
        }

        //Yes
        private void splitButton1_Click(object sender, EventArgs e)
        {
            ((Form1)this.Owner).StopTracking();

            Manager.Instance.EndIdle();

            this.Close();
        }

        //Yes + continue tracking
        private void addActiveAndIdleToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Manager.Instance.EndIdle();

            this.Close();
        } 
    }
}
